<div class="main_body">
    <!-- add user modal start -->
       <!-- user content section -->
		<div class="theme_wrapper">
			<div class="container-fluid">

				<div class="theme_section">
					<div class="row">
						<div class="col-lg-12 col-md-12">
							<div class="th_manage_user">
								<h3 class="th_title">manage user ( not vendors )</h3>
								<div class="table-responsive">
								<table class="commonTable table table-striped table-bordered manage_user" cellspacing="0" width="100%">
									<thead>
										<tr>
											<th>#</th>
											<th>User Name</th>
											<th>Email</th>
											<?php if( $this->ts_functions->getsettings('portal','revenuemodel') == 'subscription' ) { echo '<th>Plan</th>'; } ?>
											<th>Status</th>
											<th class="action">Action</th>
										</tr>
									<thead>
									<tfoot>
										<tr>
											<th>#</th>
											<th>User Name</th>
											<th>Email</th>
											<?php if( $this->ts_functions->getsettings('portal','revenuemodel') == 'subscription' ) { echo '<th>Plan</th>'; } ?>
											<th>Status</th>
											<th class="action">Action</th>
										</tr>
									<tfoot>
									<tbody>
							<?php if(!empty($userdetails)) {
							    $count = 0;
							    foreach($userdetails as $solouser) {
							    $uid = $solouser['user_id'];
							    $user_plans = $solouser['user_plans'];
							    $count++;
						    ?>
									<tr>
										<td><?php echo $count;?></td>
										<td><?php echo $solouser['user_uname'];?></td>
										<td><?php echo $solouser['user_email'];?></td>
										<?php if( $this->ts_functions->getsettings('portal','revenuemodel') == 'subscription' ) {?>
										<td>

										<select onchange="updatethevalue(this,'user');" id="<?php echo $uid.'_plans';?>">
										  <option value="0">No Plan</option>
										  <?php
                                           if(!empty($plans)){
											   foreach($plans as $plan){
												$selected=($plan['plan_id'] == $user_plans) ? 'selected' : '';
                                               echo'<option value="'.$plan['plan_id'].'"  '.$selected.' >'.$plan['plan_name'].'</option>';												
											   }
										   }
										  ?>
										
										</select>
										</td>
										<?php } ?> 
										<td>

										<select onchange="updatethevalue(this,'user');" id="<?php echo $uid.'_status';?>">
										    <option value="1" <?php echo ($solouser['user_status'] == '1' ? 'selected' : '' ); ?>>Active</option>
										    <option value="2" <?php echo ($solouser['user_status'] == '2' ? 'selected' : '' ); ?>>In Active</option>
										    <option value="3" <?php echo ($solouser['user_status'] == '3' ? 'selected' : '' ); ?>>Blocked</option>
										</select>
										</td>
										<td>
                                        <a href="<?php echo $basepath?>backend/single_user/<?php echo $uid;?>"  class="delete" title="View"><i class="fa fa-eye" aria-hidden="true"></i></a></td>
									</tr>
							<?php } } ?>
									<tbody>
								</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- user content section -->
	</div>
